using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BaHuan.Common;
using BaHuan.Entities;
using BaHuan.DataLayer;
/*
 * There are many processes that handle the flows of data
 * we call them business logic of a program.
 * For each of business logic process we create a class 
 * that handle for that process
 * 
 * */
namespace BaHuan.BusinessLayer
{
	
	public class UyNhiemChiManagement
	{

        public ResultObj SaveNewUyNhiemChi(UyNhiemChi uynhiemchi)
        		{
			ResultObj result = new ResultObj();
            uynhiemchi.Id = -1;
            UyNhiemChiDAO uynhiemchiDAO = new UyNhiemChiDAO();
            result = uynhiemchiDAO.SaveUyNhiemChi(uynhiemchi);
			
			return result;
		}

        public ResultObj UpdateUyNhiemChi(UyNhiemChi uynhiemchi)
        		{
			ResultObj result = new ResultObj();
            UyNhiemChiDAO uynhiemchiDAO = new UyNhiemChiDAO();
            result = uynhiemchiDAO.SaveUyNhiemChi(uynhiemchi);
			
			return result;
		}

        public ResultObj DeleteUyNhiemChi(UyNhiemChi uynhiemchi)
        		{
			ResultObj result = new ResultObj();
            UyNhiemChiDAO uynhiemchiDAO = new UyNhiemChiDAO();
            result = uynhiemchiDAO.DeleteUyNhiemChi(uynhiemchi);
			
			return result;
		}

        public ResultObj GetAllUyNhiemChi()
        		{
			ResultObj result = new ResultObj();
            UyNhiemChiDAO uynhiemchiDAO = new UyNhiemChiDAO();
            result = uynhiemchiDAO.GetAllUyNhiemChi();
			
			return result;
		}

        public ResultObj GetUyNhiemChiById(UyNhiemChi uynhiemchi)
        		{
			ResultObj result = new ResultObj();
            UyNhiemChiDAO uynhiemchiDAO = new UyNhiemChiDAO();
            result = uynhiemchiDAO.GetAllUyNhiemChiByID(uynhiemchi);
			
			return result;
		}
					
	}
}
